package logic

import (
	"context"
	work "short-video-media/common/proto"
	"short-video-media/service/server"
)

type ServerWork struct {
	work.UnimplementedWorkServer
}

func (s ServerWork) AddWork(ctx context.Context, in *work.AddWorkReq) (*work.AddWorkResp, error) {
	addWork, err := server.AddWork(in)
	if err != nil {
		return nil, err
	}
	return addWork, nil
}
func (s ServerWork) UpdateWork(ctx context.Context, in *work.UpdateWorkReq) (*work.UpdateWorkResp, error) {
	updateWork, err := server.UpdateWork(in)
	if err != nil {
		return nil, err
	}
	return updateWork, nil
}
func (s ServerWork) FindWork(ctx context.Context, in *work.FindWorkReq) (*work.FindWorkResp, error) {
	findWork, err := server.FindWork(in)
	if err != nil {
		return nil, err
	}
	return findWork, nil
}
